**Pippa Morgan and Yu Zheng
**Tracing the Legacy: China's Historical Aid and Contemporary Investment in Africa, International Studies Quarterly
**Replication code

use "Morgan and Zheng - Tracing the legacy - data.dta"
xtset countryn year, yearly

**TABLE 2
sum investment investment_primary investment_secondary investment_tertiary 
sum aid_by_year_1956_1999 aid_business_by_year_1956_1999 aid_total_1956_1999 aid_business_total_1956_1999 
sum polity ln_gdp_per_capita gdp_growth resources trade

**TABLE 3
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise

**TABLE 4
xtpcse investment_primary aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_primary aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_primary aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_primary aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_tertiary aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_tertiary aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_tertiary aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_tertiary aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise

**TABLE 5
xtpcse investment_primary_d aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_primary_d aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_primary_d aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_primary_d aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary_d aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary_d aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary_d aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_secondary_d aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_tertiary_d aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise 
xtpcse investment_tertiary_d aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_tertiary_d aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_tertiary_d aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwi

**FIGURE 1
clear
use "AfricaMap.dta"
spmap aid_total_1956_1999 using "Africacoord.dta", id(ID) fcolor(Reds)

**FIGURE 2
use "AfricaMap.dta"
spmap investment using "Africacoord.dta", id(ID) fcolor(Reds)
clear 

**FIGURE 1
clear
use "AfricaMap.dta"
spmap aid_total_1956_1999 using "Africacoord.dta", id(ID) fcolor(Greys)

**FIGURE 2
use "AfricaMap.dta"
spmap investment using "Africacoord.dta", id(ID) fcolor(Greys)
clear 

**SUPPLEMENTARY MATERIAL - ROBUSTNESS CHECKS 

use "Morgan and Zheng - Tracing the legacy - data.dta"
xtset countryn year, yearly

**TABLE A1 
xtpcse investment_primary_s aid_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_primary_s aid_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_primary_s aid_business_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_primary_s aid_business_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_secondary_s aid_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_secondary_s aid_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_secondary_s aid_business_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_secondary_s aid_business_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_tertiary_s aid_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_tertiary_s aid_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_tertiary_s aid_business_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_tertiary_s aid_business_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise

**TABLE A2 
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources imports, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources imports, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources imports, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources imports, pairwise

**TABLE A3 
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade un_voting, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade un_voting, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade un_voting, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade un_voting, pairwise

** TABLE A4 
xtpcse investment_csoe aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_csoe aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_csoe aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_csoe aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise

**TABLE A5 
xtpcse investment_csoe_d aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise 
xtpcse investment_csoe_d aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_csoe_d aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_csoe_d aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_d aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise 
xtpcse investment_d aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_d aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment_d aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise

**TABLE A6
xtpcse investment_csoe_s aid_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_csoe_s aid_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_csoe_s aid_business_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_csoe_s aid_business_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_s aid_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_s aid_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_s aid_business_total_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise
xtpcse investment_s aid_business_by_year_1956_1999_s polity_s ln_gdp_per_capita_s gdp_growth_s resources_s trade_s, pairwise

**TABLE A7 
xtpcse investment aid_total_1956_1969 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_total_1956_1969 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_total_1970_1979 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_total_1970_1979 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_total_1980_1989 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_total_1980_1989 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_total_1990_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_total_1990_1999 polity ln_gdp_per_capita gdp_growth resources trade, pairwise

**TABLE A8 
xtreg investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust
xtreg investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust
xtreg investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust
xtreg investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust

**TABLE A9 
egen investment_mean = mean(investment), by(country)
egen aid_total_1956_1999_mean = mean(aid_total_1956_1999), by(country)
egen aid_by_year_1956_1999_mean = mean(aid_by_year_1956_1999), by(country)
egen aid_business_total_1956_1999_m = mean(aid_business_total_1956_1999), by(country)
egen aid_business_by_year_1956_1999_m = mean(aid_business_by_year_1956_1999), by(country)
egen polity_mean = mean(polity), by(country)
egen ln_gdp_per_capita_mean = mean(ln_gdp_per_capita), by(country)
egen gdp_growth_mean = mean(gdp_growth), by(country)
egen resources_mean = mean(resources), by(country)
egen imports_mean = mean(imports), by(country)
egen trade_mean = mean(trade), by(country)
keep if year==2000 
regress investment_mean aid_total_1956_1999_mean polity_mean ln_gdp_per_capita_mean gdp_growth_mean resources_mean trade_mean
regress investment_mean aid_by_year_1956_1999_mean polity_mean ln_gdp_per_capita_mean gdp_growth_mean resources_mean trade_mean
regress investment_mean aid_business_total_1956_1999_m polity_mean ln_gdp_per_capita_mean gdp_growth_mean resources_mean trade_mean
regress investment_mean aid_business_by_year_1956_1999_m polity_mean ln_gdp_per_capita_mean gdp_growth_mean resources_mean trade_mean

clear
use "Morgan and Zheng - Tracing the legacy - data.dta"
xtset countryn year, yearly

**TABLE A10 
xtset countryn year, yearly
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist, pairwise 
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist, pairwise
outreg2 using tableA10.doc, append

**TABLE A11
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather, pairwise 
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather, pairwise

**TABLE A12
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int, pairwise

**TABLE A13
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked, pairwise

**TABLE A14
encode colonizer1, generate(colonizer1n)
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.colonizer1n, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.colonizer1n, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.colonizer1n, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.colonizer1n, pairwise

**TABLE A15
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english, pairwise

**TABLE A16
xtpcse investment aid_total_by_pop polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english population_ln, pairwise
xtpcse investment aid_by_year_by_pop polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english population_ln, pairwise
xtpcse investment aid_business_by_pop polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english population_ln, pairwise
xtpcse investment aid_business_year_by_pop polity ln_gdp_per_capita gdp_growth resources trade dist extreme_weather dis_int i.landlocked i.english population_ln, pairwise

**TABLE A17
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade stability, pairwise 
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade stability, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade stability, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade stability, pairwise

**TABLE A18 
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade corruption, pairwise 
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade corruption, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade corruption, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade corruption, pairwise

**Table A19 
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade taiwan_recognition, pairwise 
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade taiwan_recognition, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade taiwan_recognition, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade taiwan_recognition, pairwise

**Table A20
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade bit_in_force, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade bit_in_force, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade bit_in_force, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade bit_in_force, pairwise

**table A21
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade investment_lag2, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade investment_lag2, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade investment_lag2, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade investment_lag2, pairwise

**table A22
xtpcse investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade global_inward_fdi_lag2, pairwise
xtpcse investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade global_inward_fdi_lag2, pairwise
xtpcse investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade global_inward_fdi_lag2, pairwise
xtpcse investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade global_inward_fdi_lag2, pairwise

**table A23
xtpcse investment aid_total_1956_1999 i.freedom_house ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_by_year_1956_1999 i.freedom_house ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_total_1956_1999 i.freedom_house ln_gdp_per_capita gdp_growth resources trade, pairwise
xtpcse investment aid_business_by_year_1956_1999 i.freedom_house ln_gdp_per_capita gdp_growth resources trade, pairwise

**table A24 
**STEP 1: IMPUTATION
clear
use "Morgan and Zheng - Tracing the legacy - data.dta"
mi set wide
mi register imputed polity ln_gdp_per_capita gdp_growth resources trade
mi register regular investment aid_total_1956_1999 aid_by_year_1956_1999 aid_business_total_1956_1999 aid_business_by_year_1956_1999
set seed 29390 //setting seed (specifying initial value of random-number seed) so that results are broadly replicable
mi impute mvn polity ln_gdp_per_capita gdp_growth resources trade, add(20) //specified 20 imputations as recommended by stata user guide

**STEP 2: ANALYSIS (note: must use random effects model because PCSE model not supported in Stata's MI package)
mi xtset countryn year, yearly
mi estimate, post: xtreg investment aid_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust
mi estimate, post: xtreg investment aid_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust
mi estimate, post: xtreg investment aid_business_total_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust
mi estimate, post: xtreg investment aid_business_by_year_1956_1999 polity ln_gdp_per_capita gdp_growth resources trade, re robust
clear

**table A25
clear
use "Morgan and Zheng - Tracing the legacy - data.dta"
xtset countryn year
xtivreg investment polity ln_gdp_per_capita gdp_growth resources trade (aid_total_1956_1999 = ib1.african_socialist_n), first ec2sls 
xtivreg investment polity ln_gdp_per_capita gdp_growth resources trade (aid_by_year_1956_1999 = ib1.african_socialist_n), first ec2sls 
xtivreg investment polity ln_gdp_per_capita gdp_growth resources trade (aid_business_total_1956_1999 = ib1.african_socialist_n), first ec2sls 
xtivreg investment polity ln_gdp_per_capita gdp_growth resources trade (aid_business_by_year_1956_1999 = ib1.african_socialist_n), first ec2sls 
clear
